﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;

namespace BUS
{
    public class TheLoai_BUS
    {
        TheLoai_DAO ws;
        public TheLoai_DTO[] LayDanhSachTheLoai()
        {
            ws = new TheLoai_DAO();
            TheLoai_DTO[] tg = ws.DanhSachTheLoai();
            return tg;
        }

        public TheLoai_DTO DanhSachTheLoai_TheoMaTheLoai(String str_Ma)
        {
            ws = new TheLoai_DAO();
            TheLoai_DTO TheLoai = ws.DanhSachTheLoai_TheoMaTheLoai(str_Ma);
            return TheLoai;
        }

        public string MaTheLoaiTang()
        {
            ws = new TheLoai_DAO();
            return ws.MaTheLoaiTang();
        }

        public int ThemTheLoai(TheLoai_DTO dto)
        {
            ws = new TheLoai_DAO();
            return ws.ThemTheLoai(dto);
        }

        public int XoaTheLoai(TheLoai_DTO dto)
        {
            ws = new TheLoai_DAO();
            return ws.XoaTheLoai(dto);
        }

        public int CapNhatTheLoai(TheLoai_DTO dto)
        {
            ws = new TheLoai_DAO();
            return ws.CapNhatTheLoai(dto);
        }
    }
}